home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD ROM Paradise Collection 4
/
CD ROM Paradise Collection 4 1995 Nov.iso
/
program
/
mdf145.zip
/
MDF_ENG.DOC
< prev
next >
Wrap
Text File
|
1995-08-21
|
13KB
|
412 lines
MDIFF - MPATCH
Release 1.45
Simple but complete program to produce and apply patches to your programs
and data files for Dos, OS/2, Windows 95 and Windows NT.
English version.
(C) 1995/96 Maurizio Giunti - All rights reserved
1.INDEX
1.INDEX 2
2.DISCLAIMER 3
3.WARRANTY 3
4.WHY? 3
5.WHAT MDIFF-MPATCH DO? 3
6.DOS, OS/2, WINDOWS 95 AND WINDOWS NT 3
7.LIMITS 3
8.MDIFF - MDIFF2 - MDIFFW 4
9.MPATCH - MPATCH2 - MPATCHW 4
10.MDF2EXE - MDF2EXE2 - MDF2EXEW 5
11.ADVICES 5
12.LIBRARIES TO APPLY PATCHES 5
13.HOW TO REGISTER 6
14.ACKNOWLEDGEMENTS 6
2
2.DISCLAIMER
This software belongs to Shareware programs: anyone can freely distribute
and use it for a trial period of 15 days. After this period, users that
continue to use it must register their copy by sending the registration
fee to the author, Maurizio Giunti.
The registered users will receive a "registration key".
Tis sofware can be freely distributed at no cost, except for eventual
copy and/or shipping expensee. It is imperative anyway that the ORIGINAL
PACKET is distributed without any modification WHATSOEVER.
There is an exception: you can distribute MPATCH.EXE (or MPATCH2.EXE)
with one or more *.MDF files produced with a REGISTERED copy of MDIFF.
WARRANTY 3.
The only warranty that comes with this software is that it will occupy
disk space. I absolutely can NOT warrant that it will perfectly work, or
that it will be your problems' solution.
Nevertheless, it is not a virus and does not contain (unless infected or
modified after the compilation) Trojan-horses, backdoors and similar
tricky garbage. In any case, the author is not responsible for any
damage, moral or material, direct or indirect, derived from its use.
WHY? 4.
A few month ago I was updating a program of mine: the commpressed packet
was about 200 Kbytes I thought it was better to use a patch, but I could
not find a program of my satisfaction among the patch makers/appliers. In
addition I could not trace a program that could run under DOS and OS/2.
I decided to make my own patch software and.....here it is ! 8-)
WHAT MDIFF-MPATCH DO? 5.
MDIFF creates a binary difference between two files. With MPATCH and the
older file you can create a new file using the difference file. What is
the advantage? Usually the difference file is smaller and therefore more
suitable for distribution, especially by modem.
6.DOS, OS/2, WINDOWS 95 AND WINDOWS NT
I obtain MDIFF and MPATCH for Dos, OS/2 and Windows32 by compiling the
same source, so there is NO difference between them. Moreover difference
files produced with MDIFF for Dos can be used with MPATCH for OS/2 or
Windows32 and vice-versa.
7.LIMITS
MDIFF can't work on files greater than 16 Mbytes. There are no other
limits to MDIFF's work.
3
Since its source is the same of Dos' MDIFF, OS/2's MDIFF can't manage
Extended Attributes: it will ignore them.
8.MDIFF - MDIFF2 - MDIFFW
MDIFF compares 2 files and stores the differences between them in a
difference file. This is the command line syntax:
MDIFF [-C<c>] [-R<r>] [-F<f>] [-S] [-Z] [-P<pwd>] <OldFile> <NewFile>
[<MDFfile>]
<OldFile> is the name of the older file, <NewFile> is the name of the new
file. If you wish you can specify the name of the difference file that
MDIFF will produce, otherwise MDIFF will create a file with the name of
the new file but with the extension ".MDF".
To search differences between files, MDIFF use a base string of defined
length named Chunk. The Chunk length is by default 16 bytes, but you can
change it, in the range 4-256, with the -C switch followed by the desired
length.
When MDIFF loses the synchronism between the two files being compared, it
scans the older file searching the current chunk. This scansion is
executed, by default, in a range of 8 blocks of 512 bytes each. You can
change the number of the blocks scanned, in the range 1-16, with the -R
switch followed by the desired number of blocks.
If this search fails, MDIFF tries to force synchronization through a
large range search. This range is defined as 1/16 of the old file lenght,
but you can change it by the -F switch on the command line.
If you specify -S switch, MDIFF will provide some information about the
composition of the difference file.
Moreover you can add to the difference file produced a short comment (max
2 Kbytes) to display when the patch is applied, with the -Z switch. MDIFF
gets the comment from standard input, so you can type it directly or
redirect it from a file with the "<" command.
You can also protect the patch by a password using the -P switch followed
by the password.
9.MPATCH - MPATCH2 - MPATCHW
With the old file and the .MDF file you can rebuild the new file by
running MPATCH. This is the command line syntax:
MPATCH [-P<pwd>] <MDFfile> [<OldFile> [<NewFile>]]
MPATCH needs only the name of the mdf file (<MDFfile>) because it
contains the names of the other 2 files, but it's possible to override
these names specifying the desired names on the command line. MPATCH has
only the -P switche by which you can specify a password.
If there are errors during the patch applying, MPATCH returns an
errorlevel as follows:
0 "OK!"
1 "Out of memory !"
2 "Can't open MDF file !"
3 "Invalid MDF file !"
4
4 "MDF file version mismatch !"
5 "UNREGISTERED !"
6 "Bad or incorrect OLD file !"
7 "Can't open OLD file !"
8 "Can't create NEW file !"
9 "General failure: NEW file corrupted !"
10 "OLD and NEW can't be the same file !"
11 "NEW file was already patched !"
12 "Bad password !"
MDF2EXE - MDF2EXE2 - MDF2EXEW 10.
MDF2EXE is a simple utility which transforms one or more (up to 127) MDF
patch files created by MDIFF, to an executable (Dos, OS/2 or Windows32),
self installing, file.
MDF2EXE syntax is:
MDF2EXE <mdf_file 1> [<mdf_file 2>....<mdf file n>] <exe_file>
Where <mdf_file x> can contain wildcards.
The <exe_file> (which MUST have .EXE extension) will be executed without
any parameters on the command line. It will automatically search the file
to update.
Eventually you can use a -P switch to specify a password or the -V or -L
switches to list the patches contained in the file.
Warning: don't compress a self installing patch by PKLite or LZexe.
ADVICES 11.
The best method to build a difference file, is to search the chunks of
the new file in the entire older file, but this is a very slow way to
do!
MDIFF's algorithm tries to give a small diff file in the faster way; so
you are sometimes required to tune the work parameters with the command
line switches.
Let's look at some typical situations:
Very similar files: use a large chunk (32, 64 or more) to reduce the 1.
size of the diff file, in particular if the files contain text or
archives.
2. Text files: try to use a chunk size of 32, sometimes it is better to
turn the forced sync off or reduce its range by the -F switch.
3. Very large executable: try to use a larger resync range (16 or more),
with the -R switch.
Remember: MDIFF can't make miracles! If the two files are really
different, the patch will result very large. In this situation you must
distribute the entire new file. MDIFF is useful only when the number of
changes is limited.
LIBRARIES TO APPLY PATCHES 12.
Up to release 1.40 I included in MDIFF distribution packet a set of Dos,
Windows and OS/2 libraries to produce patcher programs.
5
Since I had no feedback and my spare time had reduced, I decided I will
not distribute them anymore.
I will try to develope the libraries but I think I will not develope
their docs, so if you REALLY need them, please contact me.
HOW TO REGISTER 13.
The individual registration key costs Italian Liras 25,000 (approx U.S.$
16.-). The key is valid for DOS, OS/2 and Windows32 versions of the
software up to release 1.99. The registration key will be sent by mail.
If explicity requested, it can also be sent via Internet e-mail.
The registration fee can be paid according to your preference, by check
or postal order (in Italy) or International Money Order (I.M.O.) or
Postalgiro, from abroad, payable to:
Maurizio Giunti
Via G.B. Foggini, 24
50142 Firenze (FI)
ITALY
If you are in Europe you can also send me an Eurocheque in Italian Lire.
It is better to indicate on the order the name of the program you want
to register, your name, address and FAX number or e-mail address (where
available). For short notes, use the appropriate space on the postal
order (if present), or send an e-mail to Maurizio Giunti at:
Fidonet: 2:332/102.3
Internet: giunti@abeline.it
ACKNOWLEDGEMENTS 14.
I'd like to thank all those who helped me to develop this software and
its documentation and all those who helped me in beta-testing. In
alphabetical order:
Andrea Baitelli
Silvia Borri
Filippo Dini
Fabrizio Fioravanti
Cristiano Guidoccio
Giovanni Lopes Pegna
Marco Maccaferri
Marco Menichelli
6
Giuseppe Scarpi
Toni Tatafiore
7